Skip to content

docs: document configurable templates#412

Merged
markphelps merged 1 commit into
mainfrom
docs/configurable-templates
Jul 4, 2026
Merged

docs: document configurable templates#412
markphelps merged 1 commit into
mainfrom
docs/configurable-templates

Conversation

@markphelps

@markphelps markphelps commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document server-wide configurable commit and merge proposal templates
  • Add merge proposal examples and template context details
  • Clarify repository-level templates override server-wide defaults and the current UI override limitation

Verification

  • Verified implementation against flipt-io/flipt branch v2
  • npm run lint -- --quiet v2/configuration/overview.mdx v2/guides/user/environments/merge-proposals.mdx
  • npx prettier --write v2/configuration/overview.mdx v2/guides/user/environments/merge-proposals.mdx
  • git diff --check
  • Fresh reviewer pass

Closes #411

@markphelps markphelps requested a review from a team as a code owner July 4, 2026 19:43
@claude

claude Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review

Overall this is a clear, well-structured addition — it follows the existing table/Note conventions in overview.mdx and gives both a server-wide and repository-level example in merge-proposals.mdx, matching the "include both basic and advanced use cases" guideline. A few things worth addressing before merge:

Possible issues

  1. .Changes is used but never documented (docs/v2/configuration/overview.mdx:641)
    The commit_message example uses {{ (index .Changes 0) }}, but there's no context table describing .Changes anywhere — unlike proposal_title/proposal_body, which get a full field table in merge-proposals.mdx. Readers have no way to know what .Changes contains (a list of strings? structs?) or what other fields might be available for the commit message template. Consider adding a short context table for commit_message similar to the one for merge proposals, or at least a sentence explaining the shape of .Changes.

  2. Behavior for invalid repository-level templates is unspecified
    The <Note> in overview.mdx:652-655 says invalid server-wide templates prevent configuration from loading, but neither file says what happens if a repository-level (flipt.yaml) template is invalid — does it fail the sync, fall back to the server-wide/default template, or error out only when a proposal is created? This seems like a meaningfully different failure mode worth documenting explicitly, especially since repo-level templates are edited by end users (not operators) and are more likely to contain typos.

  3. Heading order breaks the existing alphabetical convention
    Under ## Additional Settings, the new ### Templates section is inserted before ### License and ### Meta & Diagnostics, but those two are already in alphabetical order. Alphabetically, Templates should come last. Minor, but worth a quick fix for consistency.

Nit

  • {{ (index .Changes 0) }} — the outer parens aren't needed in Go's text/template syntax; {{ index .Changes 0 }} is the more idiomatic/common form and matches how .Base.Ref/.Branch.Ref are written elsewhere in the same PR without extra grouping.

Verification caveat
I wasn't able to reach flipt-io/flipt from this sandbox to independently confirm the config keys (templates.commit_message, templates.proposal_title, templates.proposal_body), the v2.5.0 "Since" version, or the exact template context field names (.Base, .Branch, .Ref, .Directory). The PR description says this was verified against the flipt-io/flipt v2 branch, which is good — just flagging that I couldn't independently re-verify it, and getting the field names right matters here since a typo would silently break user-authored templates rather than fail loudly.

What looks good

  • Frontmatter unaffected (no new files, existing pages already have it).
  • Correct markdown link syntax for the text/template reference per the style guide.
  • <Note> callouts used appropriately to flag the UI override limitation and validation behavior.
  • Table formatting matches the rest of overview.mdx (Property / Description / Default / Since).

@markphelps markphelps merged commit 617c12d into main Jul 4, 2026
4 checks passed
@markphelps markphelps deleted the docs/configurable-templates branch July 4, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document PR/commit templates config

1 participant